SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date, ,>
-- Description:	<Description, ,>
-- =============================================
CREATE FUNCTION [dbo].[GetPosId]
(
	@PosName nvarchar
)
RETURNS int
AS
BEGIN
	-- Declare the return variable here
	DECLARE @PosId int

	-- Add the T-SQL statements to compute the return value here
	SELECT @PosID = ID
	From Position
	where Position = @PosName;

	-- Return the result of the function
	RETURN @PosId;

END
GO
